import axios from "axios";
import { defineStore } from 'pinia'

export const useFenleiStore = defineStore('fenlei', {
  state: () => {
    return { 
        fenleiList:[]
     }
  },
  actions: {
    FENLEI(){
        axios.get("https://api-hmugo-web.itheima.net/api/public/v1/categories").then(res=>{
            this.fenleiList=res.data.message
        })
    }
  },
})